home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / TAN_SND.ARJ / DRUMS.SIM < prev    next >
Text File  |  1991-07-28  |  3KB  |  74 lines

  1. unit drums;   { DRUMS.PAS  Copyright (c) 1990 DSoft Specialties }
  2. interfac      { Drum routines for the Tandy 1000 and/or PCJr. See DRUMS.SIM }
  3. uses dos,noiz;
  4.  
  5. { All I ask is if you use any of these routines in your program
  6.   please mention DSoft in the docs or in a copyright message }
  7.  
  8. type
  9.   echo_style = (short,long);   { long or short echo }
  10.  
  11. const
  12.   drumpitch: word = 0;         { initial pitch for drum sounds }
  13.   inturbo: boolean = true;     { true = shorter delay in wait(dt) }
  14.  
  15. procedure wait(time: longint); { like CRT units delay routine }
  16. procedure delay(dt: longint);  { like CRT units delay routine }
  17. procedure drum_pitch(i: word); { set initial pitch }
  18.  
  19. procedure down(snd,step: byte;pitch: word);
  20. procedure up(snd,step: byte;pitch: word);
  21.  
  22. procedure noise(ch: char;sr,amp,duration: word);
  23.  
  24. procedure dwn(reps,tone,dur: integer);
  25.  
  26. procedure snare(reps,dur: byte);  { snare drum }
  27. procedure tom(reps,dur: byte);    { Tom drum }
  28. procedure lowtom(reps,dur: byte); { Floor Tom }
  29. procedure bass(reps,dur: byte);   { Bass drums }
  30. procedure bass2(reps,dur: byte);  { tricky double bass }
  31. procedure roto1(reps,dur: byte);  { roto-Tom #1 }
  32. procedure roto2(reps,dur: byte);  { roto-Tom #2 }
  33. procedure roto5(reps,tone,dur: integer); { Oddball/experimental roto-tom }
  34. procedure sims(reps,dur: byte);   { "Simmons" electronic drum - low }
  35. procedure sims1(reps,dur: byte);  { "Simmons" electronic drum - medium }
  36. procedure sims2(reps,dur: byte);  { "Simmons" electronic drum - high }
  37. procedure sims3(reps,dur: byte);  { "Simmons" electronic drum - higher }
  38. procedure crash(reps,dur: integer);
  39.  
  40. procedure roll(reps,dur,crashdur: integer);
  41. { does a cool roll
  42.   reps     = how many times to do it
  43.   dur      = play it slowly or quickly
  44.   crashdur = how long for the crash cymbal }
  45.  
  46. procedure lick(reps: byte);
  47. { a nifty little drum "lick"
  48.   reps = how many times to do this "lick" }
  49.  
  50. procedure echo(del: word;es: echo_style);
  51. { does a cool echo sound
  52.   del = delay time, time between repeats
  53.   es  = either, long, or short }
  54.  
  55. procedure quiet;
  56. { turns all 3 voices and normal PC sound off. Also, turns noise off }
  57.  
  58. function fkey: char;
  59. { like CRT's ReadKey, but if its a function key add 128 to the value of fkey
  60.   NOTE: #187 = F1 
  61.         #196 = F10 
  62. Syntax:
  63.    ch:=upcase(fkey);
  64.    case ch of
  65.      '1':;
  66.     #187: writeln('F1 hit');
  67.     #196: halt;
  68.    end; }
  69.  
  70. function keyhit: boolean;
  71. { like CRT's KeyPressed }
  72.  
  73. implementation
  74.